import {  Listdetails } from "@/api/api";
export default {
  name: 'custdetails',
  components: {}, 
  props: [],
  data () {
    return {
      Listdetails: [],
      tato:400,
      pagesize:10,
      page:1,
      params: {
        // 搜索关键字
        word: '',

      },
    }
  },
  computed: {

  },
  mounted () {

  },
  created(){
    this._Listdetails();
  },
  methods: {
    // 获取公司列表数据
    _Listdetails() {
      let params = {
        params: {}
      }
      Listdetails(params).then(res => {
        console.log(res)
        this.Listdetails = res.slice(0, 15)
      })
    },
    // 上一页
    prePage(){
      this.page--
      if (this.page === 0) {
        this.page= 1
        return
      }
    },
    // 下一页
    nextPage(){
      this.page++
      if (this.page === this.tato / this.pagesize) {
        this.page = this.tato / this.pagesize
        return
      }
    },
    // 搜索
    goSerch(){
      this._Listdetails();
    }
  }
}
